package com.yxq.mdt.app.modules.personal.adapter;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.yxq.mdt.app.R;
import com.yxq.mdt.app.modules.personal.bean.AddressListBean;

import java.util.List;

/**
 * @author L
 * @time 2019-10-31
 * @describe 地址管理列表$
 */
public class AddressListAdapter extends BaseQuickAdapter<AddressListBean.ListBean, BaseViewHolder> {
    public AddressListAdapter(int layoutResId, @Nullable List<AddressListBean.ListBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, AddressListBean.ListBean item) {
        helper.setText(R.id.address_tv_name, item.getName());
        helper.setText(R.id.address_tv_phone, item.getMobile());
        helper.setText(R.id.address_tv_detail, item.getAddress());
        helper.addOnClickListener(R.id.address_iv_edit);
        helper.addOnClickListener(R.id.content);
        helper.addOnClickListener(R.id.btnDelete);
    }
}
